<script setup>
import { ref } from 'vue'
import { useTimeAgo, useTimestamp, useNow, useDateFormat } from '@vueuse/core'
const timestamp = ref(useTimestamp().value - 60 * 60 * 100)
console.log('timestamp: ', timestamp.value)
const timeAgo = useTimeAgo(timestamp)
const now = useNow()
const formatter = ref('YYYY-MM-DD HH:mm:ss')
const formatted = useDateFormat(now, formatter)
</script>
<template>
  <p>timeAgo：{{ timeAgo }}</p>
  <p>now：{{ now }}</p>
  <p>formatted：{{ formatted }}</p>
</template>
